<?php

class wakEvents_eventCall extends databean {

	public function __construct($call) {
		if ($this->isValidStringForm($call)) {
			$this->segments=explode('.',$call);
			$this->type=$this->segments[0];
		} else {
			throw new Exception('invalid event call '.$call);
		}
	}
	
	protected $type;
	
	protected $segments=array();
	
	public function isValidStringForm($str) {
		return eregi('^([a-z][a-z_0-9]*)(\.[a-z][a-z_0-9]*)+$',$str);
	}

}
?>
